﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PProdAPI.Controllers
{
    public class HomeController : Controller
    {
        
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult Admin()
        {
            string apiUri = Url.HttpRouteUrl("DefaultApi", new { controller = "admin", });
            ViewBag.ApiUrl = new Uri(Request.Url, apiUri).AbsoluteUri.ToString();

            return View();
        }
        public ActionResult ProductionEntry()
        {
            string apiUri = Url.HttpRouteUrl("DefaultApi", new { controller = "production", });
            ViewBag.ApiUrl = new Uri(Request.Url, apiUri).AbsoluteUri.ToString();
            string shiftUri = Url.HttpRouteUrl("DefaultApi", new { controller = "shift", });
            ViewBag.ShiftUrl = new Uri(Request.Url, shiftUri).AbsoluteUri.ToString();
            string employeeUri = Url.HttpRouteUrl("DefaultApi", new { controller = "employee", });
            ViewBag.EmployeeUrl = new Uri(Request.Url, employeeUri).AbsoluteUri.ToString();
            string machineUri = Url.HttpRouteUrl("DefaultApi", new { controller = "machine", });
            ViewBag.MachineUrl = new Uri(Request.Url, machineUri).AbsoluteUri.ToString();
            string itemUri = Url.HttpRouteUrl("DefaultApi", new { controller = "item", });
            ViewBag.ItemUrl = new Uri(Request.Url, itemUri).AbsoluteUri.ToString();

            return View();
        }

    }
}
